package com.lpssfxy.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.lpssfxy.utils.Constant;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.data.mongodb.core.mapping.Document;

@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Document(value = Constant.MONGODB_RATING_COLLECTION)
public class Rating {
    @JsonIgnore
    private String _id;
    private Integer userId;    // 用户ID
    private Integer productId; // 商品ID
    private Double score;      // 商品分数
    private Integer timestamp; // 注意：时间戳是新添加的
}

